package com.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * @author
 */
public class Student extends Account implements Serializable {
    private String sno;

    private String name;

    private String sex;

    private Integer high;

    private Date birthday;

    private Date jointime;

    private String homephone;

    private String bedno;

    private String address;

    private Float avgscore;

    private String area;

    private String cno;

    private String imgsrc;

    private String pwd;
    private Integer isdelete;
    private Date createdate;

    private Date createtime;

    private List<Sc> scs;

    public List<Sc> getScs() {
        return scs;
    }

    public void setScs(List<Sc> scs) {
        this.scs = scs;
    }

    private static final long serialVersionUID = 1L;

    public String getSno() {
        return sno;
    }

    public void setSno(String sno) {
        this.sno = sno;
        this.accountid = sno;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
        this.accountname = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getHigh() {
        return high;
    }

    public void setHigh(Integer high) {
        this.high = high;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Date getJointime() {
        return jointime;
    }

    public void setJointime(Date jointime) {
        this.jointime = jointime;
    }

    public String getHomephone() {
        return homephone;
    }

    public void setHomephone(String homephone) {
        this.homephone = homephone;
    }

    public String getBedno() {
        return bedno;
    }

    public void setBedno(String bedno) {
        this.bedno = bedno;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Float getAvgscore() {
        return avgscore;
    }

    public void setAvgscore(Float avgscore) {
        this.avgscore = avgscore;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getCno() {
        return cno;
    }

    public void setCno(String cno) {
        this.cno = cno;
    }

    public String getImgsrc() {
        return imgsrc;
    }

    public void setImgsrc(String imgsrc) {
        this.imgsrc = imgsrc;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
        this.password = pwd;
    }


    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Integer getIsdelete() {
        return isdelete;
    }

    public void setIsdelete(Integer isdelete) {
        this.isdelete = isdelete;
    }

    public Date getCreatedate() {
        return createdate;
    }

    public void setCreatedate(Date createdate) {
        this.createdate = createdate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(sno, student.sno) &&
                Objects.equals(name, student.name) &&
                Objects.equals(sex, student.sex) &&
                Objects.equals(high, student.high) &&
                Objects.equals(birthday, student.birthday) &&
                Objects.equals(jointime, student.jointime) &&
                Objects.equals(homephone, student.homephone) &&
                Objects.equals(bedno, student.bedno) &&
                Objects.equals(address, student.address) &&
                Objects.equals(avgscore, student.avgscore) &&
                Objects.equals(area, student.area) &&
                Objects.equals(cno, student.cno) &&
                Objects.equals(imgsrc, student.imgsrc) &&
                Objects.equals(pwd, student.pwd) &&
                Objects.equals(createtime, student.createtime) &&
                Objects.equals(scs, student.scs);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sno, name, sex, high, birthday, jointime, homephone, bedno, address, avgscore, area, cno, imgsrc, pwd, createtime, scs);
    }
}